package com.deng.struts.web.action;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.apache.log4j.Logger;


  
public class ThreadPool {  
	
	Logger log = Logger.getLogger(ThreadPool.class);
  
	private static ExecutorService service;
    
    public void initPool(){
    	service = Executors.newCachedThreadPool();
    }
    
    public static void destoryPool(){
    	service.shutdown();
    }

	public static synchronized ExecutorService getService() {
		return service;
	}

}  